#ifndef SKYID_SPRITE_H 
#define SKYID_SPRITE_H

#include "common.h"
#include "object.h"
#include "texture.h"

namespace SkyID 
{

//- Sprite --------------------------------------------------------------------

class Sprite : public Object
{
public:
	Sprite(const Texture *texture, float x, float y, float w, float h);
	virtual ~Sprite();

	void flip(bool flipX, bool flipY);

	void setTextureRect(float x, float y, float w, float h);

	const Texture* getTexture() const { return mTexture; }
	float getWidth() const { return mWidth; }
	float getHeight() const { return mHeight; }
	const Rect* getTextureRect() const { return &mTextureRect; }

protected:
	const Texture *mTexture;
	bool mFlipX, mFlipY;
	float mWidth, mHeight;
	Rect mTextureRect;
};

} // namespace SkyID

#endif // SKYID_SPRITE_H
